﻿using RotovapPlatform.Domain.Equipment.Interfaces.Base;
using RotovapPlatform.Domain.Equipment.Interfaces.Communication;
using RotovapPlatform.Domain.Equipment.Interfaces.Robot;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace RotovapPlatform.Domain.Equipment.Interfaces.Services
{
	public interface IDeviceManager
	{
		Task<bool> InitializeAsync();
		Task<bool> ShutdownAsync();
		Task<bool> UpdateAllAxisStatusAsync();

		// 获取设备实例的方法
		IMotorBase GetMotor(string motorId);
		IPumpBase GetPump(string pumpId);
		ITCUBase GetTCU(string tcuId);
		IOilBathBase GetOilBath(string oilBathId);
		ITemperatureCollectorBase GetTemperatureCollector(string collectorId);
		IValveBase GetValve(string valveId);
		IRobotEM Robot { get; }

		// 提供设备集合的只读访问
		IReadOnlyDictionary<string, IMotorBase> Motors { get; }
		IReadOnlyDictionary<string, IPumpBase> Pumps { get; }
		IReadOnlyDictionary<string, ITCUBase> TCUs { get; }
		IReadOnlyDictionary<string, IOilBathBase> OilBaths { get; }
		IReadOnlyDictionary<string, ITemperatureCollectorBase> TemperatureCollectors { get; }
		IReadOnlyDictionary<string, IValveBase> Valves { get; }
	}
}
